﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace UserRepositorys
{
    public interface IRepository<T> where T : class, new()
    {
        //添加
        Task<int> Addasync(T enity);
        //删除
        Task<int> Deleteasync(int id);
        //修改
        Task<int> Updateasync(T enity);
        //单条查询
        Task<T> GetModelasync(int id);
        //全部查询
        Task<List<T>> GetAllasync();
        //多条件查询
        Task<List<T>> GetAllAsync(Expression<Func<T, bool>> expression);
    }
}
